package fr.demos.cinepantin;

import javax.persistence.Entity;

/**
 * 
 * @author CQP-DNT
 * Classe LignePanier
 *
 */


public class LignePanier {

	private Article article;
	private int quantite;
	private Client client ;


	public LignePanier(Article article, int quantite) {
		this.article = article;
		this.quantite = quantite;
	}

	public int getQuantite() {
		return quantite;
	}
	
	public void setQuantite(int quantite) {
		this.quantite = quantite;
	}

	public Article getArticle() {
		return article;
	}

	public void setArticle(Article article) {
		this.article = article;
	}

	public Client getClient() {
		return client;
	}

	public void setClient(Client client) {
		this.client = client;
	}

	/**
	 * typiquement le montant total est un "attribut calculé".
	 * 
	 * @return
	 */
	 public double getMontant() {
        double montant = 0 ;
        
		montant+= article.getPrixVente()* getQuantite();
        return montant ;

	 }

}
